#include "GLContext.h"

#include "sdl.h"
#include "gl.h"

namespace catan
{

GLContext::GLContext(GameState &gameState): gameStateRef(&gameState)
{
	if (!gameStateRef->isRunning())
	{
		return;
	}
	reset();
}

void GLContext::reset()
{
	glEnable(GL_TEXTURE_2D);
	glShadeModel(GL_SMOOTH);
	glClearColor(0.0f, 0.0f, 0.0f, 1.0f);
    glHint(GL_PERSPECTIVE_CORRECTION_HINT, GL_NICEST);
    glHint(GL_GENERATE_MIPMAP_HINT, GL_NICEST);
    glEnable(GL_DEPTH_TEST);
	glEnable(GL_TEXTURE_2D);
}

GLContext::~GLContext()
{
}

}